<div class="row table-bordered">
    <div class="display_ib ">
        <a href="#/home"> <img src="./assets/img/zc.png" alt="众筹网"/></a>
    </div>
    <div class="display_ib fz_25">注册</div>
</div>
<div class="row"><br/>

    <div class="panel-body table-bordered">
        <div class="col-md-8 col-sm-8 table-bordered">
            <div class="h2">用户注册</div>
            <hr/>
            <br/>
            <form action="" class="form-horizontal" name="regForm" novalidate>
                <div class="form-group"
                     ng-class="{'has-success':regForm.username.$valid&&regForm.username.$touched,'has-error':regForm.username.$invalid&&regForm.username.$touched }">
                    <label for="username" class="col-md-2 control-label">
                        会员名称
                    </label>
                    <div class="col-md-9">
                        <input id="username" type="text"
                               class="form-control input_width"
                               ng-model="username"
                               name="username"
                               ng-minlength="4" ng-maxlength="10"
                               placeholder="会员名称"
                               required>
                        <p class="help-block has-error"
                           ng-show="regForm.username.$error.required&&regForm.username.$touched">用户名不能为空</p>
                        <p class="help-block has-error"
                           ng-show="regForm.username.$error.minlength||regForm.username.$error.maxlength">长度为4-10位</p>
                    </div>
                </div>
                <div class="form-group"
                     ng-class="{'has-success':regForm.password.$valid&&regForm.password.$touched,'has-error':regForm.password.$invalid&&regForm.password.$touched}">
                    <label for="password" class="col-md-2 control-label">
                        密码
                    </label>
                    <div class="col-md-9">
                        <input id="password" type="password"
                               class="form-control input_width"
                               ng-model="password"
                               name="password"
                               ng-pattern="/^[A-Za-z]{1}[0-9A-Za-z_]{2,29}$/"
                               ng-minlength="4" ng-maxlength="10"
                               placeholder="必须以字母开头"
                               required>
                        <p class="help-block has-error" ng-show="regForm.password.$error.required
            &&regForm.password.$touched">密码不能为空</p>
                        <!--正则验证-->
                        <p class="help-block has-error"
                           ng-show="regForm.password.$error.pattern&&regForm.password.$touched">
                            只能是数字、字母和下划线</p>
                        <p class="help-block has-error"
                           ng-show="regForm.password.$error.minlength||regForm.password.$error.maxlength">密码为4-10位</p>
                    </div>
                </div>
                <div class="form-group"
                     ng-class="{'has-success':regForm.confirmPassword.$valid&&regForm.confirmPassword.$touched,'has-error':(regForm.confirmPassword.$invalid&&regForm.confirmPassword.$touched)||(user.password!=user.confirmPassword&&regForm.confirmPassword.$touched)}">
                    <label for="confirmPassword" class="col-md-2 control-label">
                        确认密码
                    </label>
                    <div class="col-md-9">
                        <input id="confirmPassword" type="password"
                               class="form-control input_width"
                               ng-model="user.confirmPassword"
                               name="confirmPassword"
                               ng-minlength="4" ng-maxlength="10"
                               ng-pattern="/^[A-Za-z]{1}[0-9A-Za-z_]{2,29}$/"
                               placeholder="再次输入密码"
                               required>
                        <p class="help-block has-error"
                           ng-show="regForm.confirmPassword.$error.required&&regForm.confirmPassword.$touched">
                            确认密码不能为空</p>
                        <!--正则验证-->
                        <p class="help-block has-error"
                           ng-show="regForm.confirmPassword.$error.pattern&&regForm.confirmPassword.$touched">
                            只能是数字、字母和下划线</p>
                        <p class="help-block has-error"
                           ng-show="regForm.confirmPassword.$error.minlength||regForm.confirmPassword.$error.maxlength">
                            确认密码为4-10位</p>
                        <p class="help-block has-error"
                           ng-show="password!=user.confirmPassword&&regForm.confirmPassword.$touched">两次密码不一致</p>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-9">
                        <a ng-hide="regForm.$invalid==false&&password==user.confirmPassword" class="btn btn-primary">注册</a>
                        <a ng-if="regForm.$invalid==false&&password==user.confirmPassword" ng-click="submit()" class="btn btn-primary">注册</a>
                    </div>
                </div>
            </form>
        </div>
        <div class="col-md-4 col-sm-4   table-bordered">
            <br/>

            <div class="h5">&nbsp;&nbsp;&nbsp;&nbsp;已是我们的会员！ <a href="#/login">登录</a></div>
            <br/>
        </div>

    </div>
</div>
<div class="row">
    <div class="modal-footer">
        <br/>

        <div class="text-center">© 2017 众筹网版权所有</div>
    </div>
</div>